package com.mkait.thief.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 
 * @TableName order
 */
@TableName(value ="thief_order")
@Data
public class ThiefOrder implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * 
     */
    @TableField(value = "goods_id")
    private Integer goodsId;

    /**
     * 
     */
    @TableField(value = "trade_no")
    private String tradeNo;

    /**
     * 流水号
     */
    @TableField(value = "transaction_id")
    private String transactionId;

    /**
     * 
     */
    @TableField(value = "paytype")
    private Integer paytype;

    /**
     * 支付渠道
     */
    @TableField(value = "channel_id")
    private Integer channelId;

    /**
     * 渠道账号
     */
    @TableField(value = "channel_account_id")
    private Integer channelAccountId;

    /**
     * 商品名称
     */
    @TableField(value = "goods_name")
    private String goodsName;

    /**
     * 商品单价
     */
    @TableField(value = "goods_price")
    private BigDecimal goodsPrice;

    /**
     * 成本价
     */
    @TableField(value = "goods_cost_price")
    private BigDecimal goodsCostPrice;

    /**
     * 数量
     */
    @TableField(value = "quantity")
    private Integer quantity;

    /**
     * 是否使用优惠券
     */
    @TableField(value = "coupon_type")
    private Integer couponType;

    /**
     * 优惠券ID
     */
    @TableField(value = "coupon_id")
    private Integer couponId;

    /**
     * 优惠价格
     */
    @TableField(value = "coupon_price")
    private BigDecimal couponPrice;

    /**
     * 总价（买家实付款）
     */
    @TableField(value = "total_price")
    private BigDecimal totalPrice;

    /**
     * 总成本价
     */
    @TableField(value = "total_cost_price")
    private BigDecimal totalCostPrice;

    /**
     * 售出通知（买家）
     */
    @TableField(value = "sold_notify")
    private Integer soldNotify;

    /**
     * 是否需要取卡密码
     */
    @TableField(value = "take_card_type")
    private Integer takeCardType;

    /**
     * 取卡密码
     */
    @TableField(value = "take_card_password")
    private String takeCardPassword;

    /**
     * 联系方式
     */
    @TableField(value = "contact")
    private String contact;

    /**
     * 是否邮件通知
     */
    @TableField(value = "email_notify")
    private Integer emailNotify;

    /**
     * 邮箱号
     */
    @TableField(value = "email")
    private String email;

    /**
     * 是否短信通知
     */
    @TableField(value = "sms_notify")
    private Integer smsNotify;

    /**
     * 手续费率
     */
    @TableField(value = "rate")
    private BigDecimal rate;

    /**
     * 手续费
     */
    @TableField(value = "fee")
    private BigDecimal fee;

    /**
     * 短信费
     */
    @TableField(value = "sms_price")
    private BigDecimal smsPrice;

    /**
     * 订单状态 0未支付 1已支付 2已关闭
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 冻结状态
     */
    @TableField(value = "is_freeze")
    private Integer isFreeze;

    /**
     * 创建时间
     */
    @TableField(value = "create_at")
    private Integer createAt;

    /**
     * IP
     */
    @TableField(value = "create_ip")
    private String createIp;

    /**
     * 支付成功时间
     */
    @TableField(value = "success_at")
    private Integer successAt;

    /**
     * 订单第一次查询无需验证码
     */
    @TableField(value = "first_query")
    private Integer firstQuery;

    /**
     * 短信付费方：0买家 1商户
     */
    @TableField(value = "sms_payer")
    private Integer smsPayer;

    /**
     * 商品总价（不含短信费）
     */
    @TableField(value = "total_product_price")
    private BigDecimal totalProductPrice;

    /**
     * 已发货数量
     */
    @TableField(value = "sendout")
    private Integer sendout;

    /**
     * 订单手续费支付方，1：商家承担，2买家承担
     */
    @TableField(value = "fee_payer")
    private Integer feePayer;

    /**
     * 结算方式，1:T1结算，0:T0结算
     */
    @TableField(value = "settlement_type")
    private Integer settlementType;

    /**
     * 商户订单最终收入（已扣除短信费，手续费）
     */
    @TableField(value = "finally_money")
    private BigDecimal finallyMoney;

    /**
     * 
     */
    @TableField(value = "is_proxy")
    private Integer isProxy;

    /**
     * 代理的商品ID
     */
    @TableField(value = "proxy_id")
    private Integer proxyId;

    /**
     * 上级商家user_id
     */
    @TableField(value = "proxy_parent_user_id")
    private Integer proxyParentUserId;

    /**
     * 
     */
    @TableField(value = "proxy_finally_money")
    private BigDecimal proxyFinallyMoney;

    /**
     * 
     */
    @TableField(value = "select_cards")
    private String selectCards;

    /**
     * 
     */
    @TableField(value = "is_cross")
    private Integer isCross;

    /**
     * 
     */
    @TableField(value = "cross_id")
    private Integer crossId;

    /**
     * 
     */
    @TableField(value = "cross_params")
    private String crossParams;

    /**
     * 
     */
    @TableField(value = "cross_orderid")
    private String crossOrderid;

    /**
     * 
     */
    @TableField(value = "is_punish")
    private Integer isPunish;

    /**
     * 
     */
    @TableField(value = "selectcard_fee_platform")
    private BigDecimal selectcardFeePlatform;

    /**
     * 
     */
    @TableField(value = "selectcard_fee_merchant")
    private BigDecimal selectcardFeeMerchant;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ThiefOrder other = (ThiefOrder) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()))
            && (this.getTradeNo() == null ? other.getTradeNo() == null : this.getTradeNo().equals(other.getTradeNo()))
            && (this.getTransactionId() == null ? other.getTransactionId() == null : this.getTransactionId().equals(other.getTransactionId()))
            && (this.getPaytype() == null ? other.getPaytype() == null : this.getPaytype().equals(other.getPaytype()))
            && (this.getChannelId() == null ? other.getChannelId() == null : this.getChannelId().equals(other.getChannelId()))
            && (this.getChannelAccountId() == null ? other.getChannelAccountId() == null : this.getChannelAccountId().equals(other.getChannelAccountId()))
            && (this.getGoodsName() == null ? other.getGoodsName() == null : this.getGoodsName().equals(other.getGoodsName()))
            && (this.getGoodsPrice() == null ? other.getGoodsPrice() == null : this.getGoodsPrice().equals(other.getGoodsPrice()))
            && (this.getGoodsCostPrice() == null ? other.getGoodsCostPrice() == null : this.getGoodsCostPrice().equals(other.getGoodsCostPrice()))
            && (this.getQuantity() == null ? other.getQuantity() == null : this.getQuantity().equals(other.getQuantity()))
            && (this.getCouponType() == null ? other.getCouponType() == null : this.getCouponType().equals(other.getCouponType()))
            && (this.getCouponId() == null ? other.getCouponId() == null : this.getCouponId().equals(other.getCouponId()))
            && (this.getCouponPrice() == null ? other.getCouponPrice() == null : this.getCouponPrice().equals(other.getCouponPrice()))
            && (this.getTotalPrice() == null ? other.getTotalPrice() == null : this.getTotalPrice().equals(other.getTotalPrice()))
            && (this.getTotalCostPrice() == null ? other.getTotalCostPrice() == null : this.getTotalCostPrice().equals(other.getTotalCostPrice()))
            && (this.getSoldNotify() == null ? other.getSoldNotify() == null : this.getSoldNotify().equals(other.getSoldNotify()))
            && (this.getTakeCardType() == null ? other.getTakeCardType() == null : this.getTakeCardType().equals(other.getTakeCardType()))
            && (this.getTakeCardPassword() == null ? other.getTakeCardPassword() == null : this.getTakeCardPassword().equals(other.getTakeCardPassword()))
            && (this.getContact() == null ? other.getContact() == null : this.getContact().equals(other.getContact()))
            && (this.getEmailNotify() == null ? other.getEmailNotify() == null : this.getEmailNotify().equals(other.getEmailNotify()))
            && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
            && (this.getSmsNotify() == null ? other.getSmsNotify() == null : this.getSmsNotify().equals(other.getSmsNotify()))
            && (this.getRate() == null ? other.getRate() == null : this.getRate().equals(other.getRate()))
            && (this.getFee() == null ? other.getFee() == null : this.getFee().equals(other.getFee()))
            && (this.getSmsPrice() == null ? other.getSmsPrice() == null : this.getSmsPrice().equals(other.getSmsPrice()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getIsFreeze() == null ? other.getIsFreeze() == null : this.getIsFreeze().equals(other.getIsFreeze()))
            && (this.getCreateAt() == null ? other.getCreateAt() == null : this.getCreateAt().equals(other.getCreateAt()))
            && (this.getCreateIp() == null ? other.getCreateIp() == null : this.getCreateIp().equals(other.getCreateIp()))
            && (this.getSuccessAt() == null ? other.getSuccessAt() == null : this.getSuccessAt().equals(other.getSuccessAt()))
            && (this.getFirstQuery() == null ? other.getFirstQuery() == null : this.getFirstQuery().equals(other.getFirstQuery()))
            && (this.getSmsPayer() == null ? other.getSmsPayer() == null : this.getSmsPayer().equals(other.getSmsPayer()))
            && (this.getTotalProductPrice() == null ? other.getTotalProductPrice() == null : this.getTotalProductPrice().equals(other.getTotalProductPrice()))
            && (this.getSendout() == null ? other.getSendout() == null : this.getSendout().equals(other.getSendout()))
            && (this.getFeePayer() == null ? other.getFeePayer() == null : this.getFeePayer().equals(other.getFeePayer()))
            && (this.getSettlementType() == null ? other.getSettlementType() == null : this.getSettlementType().equals(other.getSettlementType()))
            && (this.getFinallyMoney() == null ? other.getFinallyMoney() == null : this.getFinallyMoney().equals(other.getFinallyMoney()))
            && (this.getIsProxy() == null ? other.getIsProxy() == null : this.getIsProxy().equals(other.getIsProxy()))
            && (this.getProxyId() == null ? other.getProxyId() == null : this.getProxyId().equals(other.getProxyId()))
            && (this.getProxyParentUserId() == null ? other.getProxyParentUserId() == null : this.getProxyParentUserId().equals(other.getProxyParentUserId()))
            && (this.getProxyFinallyMoney() == null ? other.getProxyFinallyMoney() == null : this.getProxyFinallyMoney().equals(other.getProxyFinallyMoney()))
            && (this.getSelectCards() == null ? other.getSelectCards() == null : this.getSelectCards().equals(other.getSelectCards()))
            && (this.getIsCross() == null ? other.getIsCross() == null : this.getIsCross().equals(other.getIsCross()))
            && (this.getCrossId() == null ? other.getCrossId() == null : this.getCrossId().equals(other.getCrossId()))
            && (this.getCrossParams() == null ? other.getCrossParams() == null : this.getCrossParams().equals(other.getCrossParams()))
            && (this.getCrossOrderid() == null ? other.getCrossOrderid() == null : this.getCrossOrderid().equals(other.getCrossOrderid()))
            && (this.getIsPunish() == null ? other.getIsPunish() == null : this.getIsPunish().equals(other.getIsPunish()))
            && (this.getSelectcardFeePlatform() == null ? other.getSelectcardFeePlatform() == null : this.getSelectcardFeePlatform().equals(other.getSelectcardFeePlatform()))
            && (this.getSelectcardFeeMerchant() == null ? other.getSelectcardFeeMerchant() == null : this.getSelectcardFeeMerchant().equals(other.getSelectcardFeeMerchant()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
        result = prime * result + ((getTradeNo() == null) ? 0 : getTradeNo().hashCode());
        result = prime * result + ((getTransactionId() == null) ? 0 : getTransactionId().hashCode());
        result = prime * result + ((getPaytype() == null) ? 0 : getPaytype().hashCode());
        result = prime * result + ((getChannelId() == null) ? 0 : getChannelId().hashCode());
        result = prime * result + ((getChannelAccountId() == null) ? 0 : getChannelAccountId().hashCode());
        result = prime * result + ((getGoodsName() == null) ? 0 : getGoodsName().hashCode());
        result = prime * result + ((getGoodsPrice() == null) ? 0 : getGoodsPrice().hashCode());
        result = prime * result + ((getGoodsCostPrice() == null) ? 0 : getGoodsCostPrice().hashCode());
        result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
        result = prime * result + ((getCouponType() == null) ? 0 : getCouponType().hashCode());
        result = prime * result + ((getCouponId() == null) ? 0 : getCouponId().hashCode());
        result = prime * result + ((getCouponPrice() == null) ? 0 : getCouponPrice().hashCode());
        result = prime * result + ((getTotalPrice() == null) ? 0 : getTotalPrice().hashCode());
        result = prime * result + ((getTotalCostPrice() == null) ? 0 : getTotalCostPrice().hashCode());
        result = prime * result + ((getSoldNotify() == null) ? 0 : getSoldNotify().hashCode());
        result = prime * result + ((getTakeCardType() == null) ? 0 : getTakeCardType().hashCode());
        result = prime * result + ((getTakeCardPassword() == null) ? 0 : getTakeCardPassword().hashCode());
        result = prime * result + ((getContact() == null) ? 0 : getContact().hashCode());
        result = prime * result + ((getEmailNotify() == null) ? 0 : getEmailNotify().hashCode());
        result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
        result = prime * result + ((getSmsNotify() == null) ? 0 : getSmsNotify().hashCode());
        result = prime * result + ((getRate() == null) ? 0 : getRate().hashCode());
        result = prime * result + ((getFee() == null) ? 0 : getFee().hashCode());
        result = prime * result + ((getSmsPrice() == null) ? 0 : getSmsPrice().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getIsFreeze() == null) ? 0 : getIsFreeze().hashCode());
        result = prime * result + ((getCreateAt() == null) ? 0 : getCreateAt().hashCode());
        result = prime * result + ((getCreateIp() == null) ? 0 : getCreateIp().hashCode());
        result = prime * result + ((getSuccessAt() == null) ? 0 : getSuccessAt().hashCode());
        result = prime * result + ((getFirstQuery() == null) ? 0 : getFirstQuery().hashCode());
        result = prime * result + ((getSmsPayer() == null) ? 0 : getSmsPayer().hashCode());
        result = prime * result + ((getTotalProductPrice() == null) ? 0 : getTotalProductPrice().hashCode());
        result = prime * result + ((getSendout() == null) ? 0 : getSendout().hashCode());
        result = prime * result + ((getFeePayer() == null) ? 0 : getFeePayer().hashCode());
        result = prime * result + ((getSettlementType() == null) ? 0 : getSettlementType().hashCode());
        result = prime * result + ((getFinallyMoney() == null) ? 0 : getFinallyMoney().hashCode());
        result = prime * result + ((getIsProxy() == null) ? 0 : getIsProxy().hashCode());
        result = prime * result + ((getProxyId() == null) ? 0 : getProxyId().hashCode());
        result = prime * result + ((getProxyParentUserId() == null) ? 0 : getProxyParentUserId().hashCode());
        result = prime * result + ((getProxyFinallyMoney() == null) ? 0 : getProxyFinallyMoney().hashCode());
        result = prime * result + ((getSelectCards() == null) ? 0 : getSelectCards().hashCode());
        result = prime * result + ((getIsCross() == null) ? 0 : getIsCross().hashCode());
        result = prime * result + ((getCrossId() == null) ? 0 : getCrossId().hashCode());
        result = prime * result + ((getCrossParams() == null) ? 0 : getCrossParams().hashCode());
        result = prime * result + ((getCrossOrderid() == null) ? 0 : getCrossOrderid().hashCode());
        result = prime * result + ((getIsPunish() == null) ? 0 : getIsPunish().hashCode());
        result = prime * result + ((getSelectcardFeePlatform() == null) ? 0 : getSelectcardFeePlatform().hashCode());
        result = prime * result + ((getSelectcardFeeMerchant() == null) ? 0 : getSelectcardFeeMerchant().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", goodsId=").append(goodsId);
        sb.append(", tradeNo=").append(tradeNo);
        sb.append(", transactionId=").append(transactionId);
        sb.append(", paytype=").append(paytype);
        sb.append(", channelId=").append(channelId);
        sb.append(", channelAccountId=").append(channelAccountId);
        sb.append(", goodsName=").append(goodsName);
        sb.append(", goodsPrice=").append(goodsPrice);
        sb.append(", goodsCostPrice=").append(goodsCostPrice);
        sb.append(", quantity=").append(quantity);
        sb.append(", couponType=").append(couponType);
        sb.append(", couponId=").append(couponId);
        sb.append(", couponPrice=").append(couponPrice);
        sb.append(", totalPrice=").append(totalPrice);
        sb.append(", totalCostPrice=").append(totalCostPrice);
        sb.append(", soldNotify=").append(soldNotify);
        sb.append(", takeCardType=").append(takeCardType);
        sb.append(", takeCardPassword=").append(takeCardPassword);
        sb.append(", contact=").append(contact);
        sb.append(", emailNotify=").append(emailNotify);
        sb.append(", email=").append(email);
        sb.append(", smsNotify=").append(smsNotify);
        sb.append(", rate=").append(rate);
        sb.append(", fee=").append(fee);
        sb.append(", smsPrice=").append(smsPrice);
        sb.append(", status=").append(status);
        sb.append(", isFreeze=").append(isFreeze);
        sb.append(", createAt=").append(createAt);
        sb.append(", createIp=").append(createIp);
        sb.append(", successAt=").append(successAt);
        sb.append(", firstQuery=").append(firstQuery);
        sb.append(", smsPayer=").append(smsPayer);
        sb.append(", totalProductPrice=").append(totalProductPrice);
        sb.append(", sendout=").append(sendout);
        sb.append(", feePayer=").append(feePayer);
        sb.append(", settlementType=").append(settlementType);
        sb.append(", finallyMoney=").append(finallyMoney);
        sb.append(", isProxy=").append(isProxy);
        sb.append(", proxyId=").append(proxyId);
        sb.append(", proxyParentUserId=").append(proxyParentUserId);
        sb.append(", proxyFinallyMoney=").append(proxyFinallyMoney);
        sb.append(", selectCards=").append(selectCards);
        sb.append(", isCross=").append(isCross);
        sb.append(", crossId=").append(crossId);
        sb.append(", crossParams=").append(crossParams);
        sb.append(", crossOrderid=").append(crossOrderid);
        sb.append(", isPunish=").append(isPunish);
        sb.append(", selectcardFeePlatform=").append(selectcardFeePlatform);
        sb.append(", selectcardFeeMerchant=").append(selectcardFeeMerchant);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}